package com.iliad2x.FlexTransform
{
	import com.iliad2x.FlexTransform.uiObject.SelectionObject;
	import com.iliad2x.FlexTransform.uiObject.TransformItem;
	
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import mx.core.UIComponent;
	
	import spark.components.Group;
	import spark.core.IGraphicElement;
	
	public class TransformArea extends Group
	{
		private var _transformItems:Array;
		
		/** Getter for items **/
		public function get transformItems():Array
		{
			return _transformItems;
		}
		
		public function TransformArea()
		{
			addEvents();
		}
		
		/** Add Events for TransformArea **/
		private function addEvents():void
		{
			addEventListener(MouseEvent.MOUSE_DOWN, onMouseDownHandler);
		}
		
		/** Mouse-Down EventHandler for TransformArea **/
		private function onMouseDownHandler(e:MouseEvent):void
		{
			if(e.target == this)
				trace("Un selected !");
		}
		
		/** Add Object into TransformArea **/
		public function addObject($value:UIComponent):void
		{
			var transformitem:TransformItem = new TransformItem;
			transformitem.addObject($value);
			addElement(transformitem);
		}
		
		/** Deselect Object for Selected-Object **/
		private function deselectObject($target:UIComponent):void
		{
			
		}
	}
}